import ConfigurationDetailComp from "containers/setting/configuration-center/configuration-detail/configuration-detail";
import SecuritySettingComp from "containers/setting/security-setting/security-setting";
import CallbackSettingComp from "containers/setting/callback-setting/callback-setting";
import SupplierTypeComp from "containers/setting/supplier-type/supplier-type";
import OperationLogComp from "containers/setting/operation-log/operation-log";
import UserAgreementComp from "containers/setting/user-agreement/user-agreement";
import ConfigurationCenterComp from "containers/setting/configuration-center/configuration-center";
import DepartmentGroupDetailQuery from "containers/setting/department-group-detail-query/department-group-detail-query";
import EmailSetting from "containers/setting/email-notification/email-setting";
import WorkflowComp from "containers/setting/workflow/workflow";
import NewWorkflowComp from "containers/setting/new-workflow/workflow-list";
import WorkflowSettingComp from "containers/setting/workflow/workflow-detail";
import BeepTimerComp from "containers/setting/beep-timer/beep-timer";
import FunctionProfileComp from "containers/setting/function-profile/function-profile";
import NotificationSetting from "containers/setting/notification-setting/notification-setting"
import ApproveSuggestComp from "containers/setting/approve-suggest/approve-suggest"
import AgencySettingMenu from 'routes/admin/setting/agency-setting';
import AnnouncementInformationMenu from 'routes/admin/setting/announcement-information';
import CityGroupMenu from 'routes/admin/setting/city-group';
import CodingRuleObjectMenu from 'routes/admin/setting/coding-rule-object';
import CompanyGroupMenu from 'routes/admin/setting/company-group';
import CostCenterMenu from 'routes/admin/setting/cost-center';
import CostCenterGroupMenu from 'routes/admin/setting/cost-center-group';
import CostCenterGroupClassMenu from 'routes/admin/setting/cost-center-group-class';
import CostCenterGroupDetailQueryMenu from 'routes/admin/setting/cost-center-group-detail-query';
import CompanyLevelDefineMenu from 'routes/admin/setting/company-level-define';
import ContractTypeDefineMenu from 'routes/admin/setting/contract-type-define';
import CustomerTypeDefineMenu from 'routes/admin/setting/customer-type-define';
import CurrencySettingMenu from 'routes/admin/setting/currency-setting';
import DepartmentGroupMenu from 'routes/admin/setting/department-group';
import ExpenseTypeMenu from 'routes/admin/setting/expense-type';
import FormListMenu from 'routes/admin/setting/form-list';
import InvoiceBagMenu from 'routes/admin/setting/invoice-bag';
import ProcessMonitoringPlatformMenu from 'routes/admin/setting/process-monitoring-platform';
import RoleSettingMenu from 'routes/admin/setting/role-setting';
import SubApplicationMenu from 'routes/admin/setting/sub-application';
import SubApplicationPrivatizationMenu from 'routes/admin/setting/sub-application-privatization';
import SubjectSheetDefineMenu from 'routes/admin/setting/subject-sheet-define';
import ValueListMenu from 'routes/admin/setting/value-list';
import AllocateCenter from 'containers/setting/allocate-center/allocate-center';
import {
  PersonGroupMenu,
  // PersonGroupTenantMenu,
  // PersonGroupCompanyMenu
} from 'routes/admin/setting/person-group';

//客户类型定义
//设置
const setting = {
  key:'setting',
  icon: 'setting',
  admin: true,
  subMenu: [
    ExpenseTypeMenu,//费用类别
    ValueListMenu,//值列表

    //安全设置
    {
      key:'security-setting',
      url:'/main/setting/security-setting',
      components: SecuritySettingComp,
      parent: 'setting',
      fpItem: ["web.nav.settings.security.disabled"],
      fpValue: [[false,undefined]],
      tenant: true,
      children:{},
    },
    RoleSettingMenu,//角色设置

    //操作日志
    {
      key:'operation-log',
      url:'/main/setting/operation-log',hideInUrl: 'console-tc.huilianyi.com',
      components: OperationLogComp,
      parent: 'setting',
      tenant: true,
      children:{}
    },
    //用户协议
    {
      key:'user-agreement',
      url:'/main/setting/user-agreement',
      components: UserAgreementComp,
      parent: 'setting',
      tenant: true,
      children:{}
    },
    // 配置中心
    {
      key:'configuration-center',
      url:'/main/setting/configuration-center',
      components: ConfigurationCenterComp,
      parent: 'setting',
      fpItem: ["settings.control.disabled"],
      fpValue: [[false, undefined]],
      tenant: true,
      children:{
        configurationDetail: {
          key:'configuration-detail',
          url:'/main/setting/configuration-center/detail/:id',
          components: ConfigurationDetailComp,
          parent: 'configuration-center'
        }
      }
    },
    //回调设置
    {
      key:'callback-setting',
      url:'/main/setting/callback-setting',
      lazy:true,
      hideInUrl: ['console-my.huilianyi.com', 'console-sg.huilianyi.com'],
      components:CallbackSettingComp,
      parent: 'setting',
      fpItem: ["web.nav.settings.callback.disabled"],
      fpValue: [[false,undefined]],
      children:{}
    },
    CodingRuleObjectMenu,//编码规则定义
    CompanyGroupMenu,//公司组
    DepartmentGroupMenu,// 部门组

    // 部门组与部门查询
    {
      key: 'department-group-detail-query',
      url: '/main/setting/department-group-detail-query',
      components: DepartmentGroupDetailQuery,
      parent: 'setting',
      tenant: true,
      children: {},
    },
    CostCenterMenu,//成本中心
    CostCenterGroupMenu, //成本中心组
    CostCenterGroupDetailQueryMenu,// 成本中心组明细查询
    CostCenterGroupClassMenu,//成本中心组类别
    PersonGroupMenu,
    // PersonGroupTenantMenu, // 集团人员组
    // PersonGroupCompanyMenu, // 公司人员组
    SubjectSheetDefineMenu,// 科目表定义
    AnnouncementInformationMenu,//公告信息

    //供应商类型定义
    {
      key: 'supplier-type',
      url: '/main/setting/supplier-type',
      hideInUrl: ['console-my.huilianyi.com', 'console-sg.huilianyi.com'],
      components: SupplierTypeComp,
      tenant: true,
      parent: 'setting'
    },
    // //差补规则

    CityGroupMenu, //城市级别 城市组
    SubApplicationMenu, //子应用管理
    SubApplicationPrivatizationMenu,//子应用管理--私有化
    FormListMenu,//表单管理
    CurrencySettingMenu,//币种设置
    CompanyLevelDefineMenu,//公司级别定义
    //邮件消息设置
    {
      key: 'email-notification',
      url: '/main/setting/email-notification',
      components: EmailSetting,
      parent: 'setting',
      tenant: true,
    },
    //审批流
    {
      key: 'workflow',
      url: '/main/setting/workflow',
      components: NewWorkflowComp,
      parent: 'setting',
      fpItem: ["settings.approval.chain.disabled"],
      fpValue: [[false, undefined]],
      children: {
        //审批流设置
        workflowSetting: {
          key: 'workflow-setting',
          url: '/main/setting/workflow/workflow-setting/:formOID',
          components: WorkflowSettingComp,
          parent: 'workflow'
        },
      }
    },
    // //审批流
    // {
    //   key: 'new-workflow',
    //   url: '/main/setting/new-workflow',
    //
    //   components: NewWorkflowComp,
    //   parent: 'setting',
    //   fpItem: ["settings.approval.chain.disabled"],
    //   fpValue: [[false, undefined]],
    //   children: {
    //     //审批流设置
    //     workflowNewSetting: {
    //       key: 'workflow-new-setting',
    //       url: '/main/setting/new-workflow/workflow-setting/:formOID/:version',
    //
    //       components: WorkflowSettingComp,
    //       parent: 'new-workflow'
    //     },
    //   }
    // },
    //单据提醒管理
    {
      key:'beep-timer',
      url:'/main/setting/beep-timer',
      components: BeepTimerComp,
      parent: 'setting',
      children:{},
      company: true
    },
    AgencySettingMenu,//代理设置
    ProcessMonitoringPlatformMenu,//流程监控平台

    //功能配置文件
    {
      key: 'function-profile',
      url: '/main/setting/function-profile',
      components: FunctionProfileComp,
      parent: 'setting'
    },
    //消息设置
    {
      key: 'notification-setting',
      url: '/main/setting/notification-setting',
      components: NotificationSetting,
      parent: 'setting',
      tenant: true,
    },
    //审批意见
    {
      key:'approve-suggest',
      url:'/main/setting/approve-suggest',
      components: ApproveSuggestComp,
      parent: 'setting',
      tenant:true,
      company: true,
    },
    InvoiceBagMenu,//发票袋
    ContractTypeDefineMenu,//合同类型定义
    CustomerTypeDefineMenu,//客户类型定义
    // 设置中心
    {
      key: 'allocate-center',
      url: '/main/setting/allocate-center',
      components: AllocateCenter,
      parent: 'setting',
    }
  ]
};

export default setting
